import 'package:bruno/bruno.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';


import '../../AppConfig/Config.dart';
import '../../AppConfig/LocalStorage.dart';
import '../../AppConfig/RouteAct.dart';
import '../../l10n/messages.dart';
import 'PayAuthentication.dart';

class PaymentManagement extends StatefulWidget {
  const PaymentManagement({super.key});

  @override
  State<PaymentManagement> createState() => _PaymentManagementState();
}

class _PaymentManagementState extends State<PaymentManagement> {
  @override
  Widget build(BuildContext context) {
    var messages = AppLocalizations.of(context)!;
    final screenSize = MediaQuery.of(context).size;
    return Scaffold(
      backgroundColor: MyColors.backgreyColor,
      appBar: AppBar(
        backgroundColor: Colors.white,
        centerTitle: true,
        leading: IconButton(
          icon: Icon(Icons.arrow_back_ios, color: Colors.black),
          onPressed: () => Navigator.of(context).pop(),
        ),
        title: Text(messages['支付管理'],style: TextStyle(color: Colors.black,fontWeight: FontWeight.w300,fontSize: 16.sp),),
      ),
      body: ListView(
        children: [
          SizedBox(height: 8.h,),
          GestureDetector(
            child:Container(
              height: 35.h,
              padding: EdgeInsets.only(left: 10.w,right: 10.w),
              color: Colors.white,
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Text("设置支付密码",style: TextStyle(color: Colors.black,fontSize: 16.sp),),
                  Icon(Icons.arrow_forward_ios,color: MyColors.hintColor,size: 16,),
                ],
              ),
            ),
            onTap: ()async{
              String? phoneNum=await PhoneNumManager.getPhone();
              Navigator.push( context, FadeRoute(page:PayAuthentication(phoneNum:phoneNum!,)));
            },
          )
        ],
      ),
    );
  }
}
